package com.urea.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.urea.common.annotation.Excel;
import com.urea.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * `终端在门店的使用日期 t_terminal
 * 
 * @author liuzd
 * @date 2023-08-01
 */
@TableName("t_terminal_service_info")
@Data
@ToString
public class TerminalServiceInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(type = IdType.AUTO)
    private Long id;

    @Excel(name = "设备id")
    @ApiModelProperty( "设备id")
    private Long terminalId;

    @Excel(name = "门店id")
    @ApiModelProperty( "门店id")
    private Long storeUid;

    @Excel(name = "是否首次")
    @ApiModelProperty( "是否首次 0否，1是")
    private Integer first;

    /** 终端使用过期时间*/
    @Excel(name = "终端使用过期时间")
    @ApiModelProperty( "终端使用过期时间")
    private LocalDateTime useExpiredTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty( "创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    public TerminalServiceInfo() {

    }

    public TerminalServiceInfo(Long terminalId, Long storeUid, Integer first, LocalDateTime useExpiredTime) {
        this.terminalId = terminalId;
        this.storeUid = storeUid;
        this.first = first;
        this.useExpiredTime = useExpiredTime;
    }
}
